import { createStore } from 'vuex'
// createStore 创建vuex 操作实例 vuex 组合式api
// 替代了 new Vuex.Store()
import getters from './getter'
import about from './module/about'
export default createStore({
  state: {
    token: "jintianxingqisan",
    count: 1,
  },
  mutations: {
    changeCount (state, num) {
      state.count = num;
    }
  },
  getters,//getters数据  文件模块化
  actions: {
    actCount ({ commit }, num) {
      commit("changeCount", num)
    }
  },
  modules: {
    about
  },
  plugins: []
})
